package com.zzxx.photograph.service;

import com.zzxx.photograph.domain.Comment;
import com.zzxx.photograph.domain.Img;
import com.zzxx.photograph.domain.PageBean;
import com.zzxx.photograph.domain.User;

import java.util.List;
import java.util.Map;

public interface ImgService {
    PageBean<Img> findImgByIname(String condition, int currentPage, int pageSize);

    boolean imgIsFavorite(int iid, int uid);

    PageBean<Img> findAll(int currentPage, int pageSize);

    void favorite(int iid, int uid);

    void cancelFavorite(int iid, int uid);

    PageBean<Img> findImgsByUid(int uid, int pageSize, int currentPage);

    Img findImgByIid(int iid);

    void addClick(int iid);

    int findfavoriteCount(int iid);

    String findSrcByIid(int iid);

    PageBean<Img> findByFavorite(int currentPage, int pageSize);

    PageBean<Img> findImgsByIname(Map<String, String[]> condition, int currentPage, int pageSize);

    void addImg(Img img);

    PageBean<Img> findImgByAid(int aid,int currentPage, int pageSize);

    Integer getMaxId();

    Integer findCid(String cname);

    void updateImg(Img img);

    void deleteImg(Integer iid);

    void comment(int iid, int uid);

    List<Comment> loadComment(int iid);

    void addComment(int iid, String text, int uid,String time);

    void deleteComment(int comid);

    User findUserbyUid(Integer uid);

    Integer countComment(int iid);


    int addSupport(int comid);

    int addNonSupport(int comid);

    void deleteFavoriteImg(Integer iid);

}
